/**
 *
 */
package com.sino.tb.attachment.route;

import java.util.List;

import com.sino.tb.attachment.assets.Device;
import com.sino.tb.attachment.assets.User;
import com.sino.tb.attachment.connection.Connection;
import com.sino.tb.attachment.connection.FTPConnection;
import com.sino.tb.attachment.file.Folder;

/**
 * @author royeer
 *
 */
public class Location {
	private Device device = null;

	private Location topLocation = null;

	private Location leftLocation = null;

	private Location rightLocation = null;

	private String ipLocal="";

	private Folder folder = null;

	private List folderList = null;

	public boolean isConnectable(User user) {
		Connection ftpConnection = new FTPConnection();
		if (ftpConnection.Connect(this.device.getIpDev(), user)) {
			return ftpConnection.Close();
		} else
			return false;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

	public Device getDevice() {
		return device;
	}

	public void setDevice(Device device) {
		this.device = device;
	}

	public List getFolderList() {
		return folderList;
	}

	public void setFolderList(List folderList) {
		this.folderList = folderList;
	}

	public Location getLeftLocation() {
		return leftLocation;
	}

	public void setLeftLocation(Location leftLocation) {
		this.leftLocation = leftLocation;
	}

	public Location getRightLocation() {
		return rightLocation;
	}

	public void setRightLocation(Location rightLocation) {
		this.rightLocation = rightLocation;
	}

	public Location getTopLocation() {
		return topLocation;
	}

	public void setTopLocation(Location topLocation) {
		this.topLocation = topLocation;
	}

	public Folder getFolder() {
		return folder;
	}

	public void setFolder(Folder folder) {
		this.folder = folder;
	}

	public String getIpLocal() {
		return ipLocal;
	}

	public void setIpLocal(String ipLocal) {
		this.ipLocal = ipLocal;
	}

}
